package com.rui.state.obj;

import com.rui.state.model.Context;

/**
 * @Description: 停止状态
 * @Author: ZhangRui
 * @Date: 2023/3/3 15:35
 * @Version: 1.0
 */
public class StopState extends LiftState {

    @Override
    public void open() {
        super.context.setLiftState(Context.OPEN_STATE);
        super.context.open();
    }

    @Override
    public void close() {
        super.context.setLiftState(Context.CLOSE_STATE);
        super.context.close();
    }

    @Override
    public void run() {
        super.context.setLiftState(Context.RUN_STATE);
        super.context.run();
    }

    @Override
    public void stop() {
        System.out.println("电梯停止了!");
    }
}
